import React ,{Component} from "react";  
import ReactDOM , {render} from  "react-dom";
// import ReactCSSTransitionGroup from 'react-addons-css-transition-group'; 
import {BrowserRouter,HashRouter,Link,Route,Switch,Redirect} from "react-router-dom";
import Guide from "./guide"
import Layout from "./layout"
import Login from "./login"
import Register from "./register"
import Play from "./play"

export default class App extends Component{
    render(){
        return (
           <Route 
                render={({location})=>(
                  
                    <Switch location={location} >
                        <Route path="/" exact component={Guide} />
                        <Route path="/layout/:tab?" exact component={Layout} />
                        <Route path="/login" component={Login} />
                        <Route path="/register" component={Register} />
                        <Route path="/play/:src?" component={Play} />
                        <Route  render={
                            ()=>{
                                return <Redirect to="/layout/index"/>
                            }
                        } /> 
                        
                    </Switch>
                )}
           />
        )
    }
}

